﻿<%@ Page Title="" Language="C#" MasterPageFile="~/common/AfterLogin.master" AutoEventWireup="true" CodeFile="insurance_terminate.aspx.cs" Inherits="product_insurance_user_insurance_terminate" %>
<%------------------------ Jifen create 2013.06.05 -------------------------%>
<asp:Content ID="Content3" ContentPlaceHolderID="leftMenu" Runat="Server">
    <ul>
                   <li><a href="<%= Page.ResolveUrl("~/product/insurance/user/insurance_statement.aspx")%>">Plan Statement</a></li>
                   <li><a href="<%= Page.ResolveUrl("~/product/insurance/user/insurance_certificate.aspx")%>">Plan Certificate</a></li>
                   <li><a href="<%= Page.ResolveUrl("~/product/insurance/user/insurance_terminate.aspx")%>">Terminate / Renew</a></li>
                   <li><a href="<%= Page.ResolveUrl("~/product/insurance/user/insurance_claim.aspx")%>">Claim Instructions</a></li>
                    <li><a href="<%= Page.ResolveUrl("~/product/insurance/insurance_home.aspx")%>">Plan Details</a></li>
                   <li><a href="<%= Page.ResolveUrl("~/product/insurance/user/insurance_apply_hospital.aspx")%>">Apply For Hospitalisation Plan</a></li>
                   <li><a href="<%= Page.ResolveUrl("~/product/insurance/user/insurance_apply_accident.aspx")%>">Apply For Personal Accident Plan</a></li>
                  
    </ul>

</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="content" Runat="Server">


 <h1 style="font-size: 2.0em; text-transform: none; font-weight: 900; font-family: Andalus;">
        Terminate / Renew A Plan</h1><asp:SqlDataSource ID="SqlDs_terminate" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            
        
        SelectCommand="SELECT D.planType, I.productType,D.policyStatus,D.terminateReason, D.insuredID FROM INSURANCE I,INSURED D where I.accountNo=D.accountNo and custID = @custID">
        <SelectParameters>
            <asp:SessionParameter Name="custID" SessionField="userId" />
        </SelectParameters>
        </asp:SqlDataSource>

     <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="SELECT [text], [id] FROM [QUESTION] WHERE (([question_group] = @question_group) AND ([category] = @category)) ORDER BY [sort_order]">
         <SelectParameters>
             <asp:Parameter DefaultValue="reason" Name="question_group" Type="String" />
             <asp:Parameter DefaultValue="insurance" Name="category" Type="String" />
         </SelectParameters>
    </asp:SqlDataSource>

     <asp:GridView ID="gv_terminate" runat="server"
            AutoGenerateColumns="False" DataSourceID="SqlDs_terminate" 
            BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
            CellPadding="4" ForeColor="Black" GridLines="Vertical" 
        onrowcommand="gv_terminate_RowCommand" onrowdatabound="gv_terminate_RowDataBound"  
        >
         <AlternatingRowStyle BackColor="White" />
         <Columns>
             <asp:BoundField DataField="insuredID" HeaderText="Certificate No" 
                 SortExpression="insuredID" />
                 <asp:BoundField DataField="policyStatus" HeaderText="policyStatus" SortExpression="policyStatus"/>
             <asp:TemplateField HeaderText="Terminate Reason" 
                 SortExpression="terminateReason">
                 
                 <ItemTemplate>
                     <asp:DropDownList ID="dl_reason" runat="server"
                         DataSourceID="SqlDataSource1" DataTextField="text" DataValueField="id" 
                         Width="200px">
                     </asp:DropDownList>
                 </ItemTemplate>
                 <ItemStyle Width="10px" />
             </asp:TemplateField>
             <asp:ButtonField CommandName="teminate" Text="Teminate" ButtonType="Button"/>
             <asp:ButtonField ButtonType="Button" CommandName="pay" Text="Renew" /> 
             
             <asp:TemplateField HeaderText="terminateReason" Visible="False">
                 <ItemTemplate>
                     <asp:HiddenField ID="hd_terminateReason" Value='<%# Bind("terminateReason") %>' runat="server" />
                 </ItemTemplate>
             </asp:TemplateField>
             
         </Columns>
         <FooterStyle BackColor="#CCCC99" />
         <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
         <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
         <RowStyle BackColor="#F7F7DE" />
         <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
         <SortedAscendingCellStyle BackColor="#FBFBF2" />
         <SortedAscendingHeaderStyle BackColor="#848384" />
         <SortedDescendingCellStyle BackColor="#EAEAD3" />
         <SortedDescendingHeaderStyle BackColor="#575357" />
     </asp:GridView>

        
   

    <br />
    <asp:GridView ID="gv_InsuranceTransaction" runat="server" BackColor="White" 
        BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
        DataSourceID="SqlDataSourceInsuranceTransaction" ForeColor="Black" 
        GridLines="Vertical">
        <AlternatingRowStyle BackColor="White" />
        <FooterStyle BackColor="#CCCC99" />
        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
        <RowStyle BackColor="#F7F7DE" />
        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#FBFBF2" />
        <SortedAscendingHeaderStyle BackColor="#848384" />
        <SortedDescendingCellStyle BackColor="#EAEAD3" />
        <SortedDescendingHeaderStyle BackColor="#575357" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSourceInsuranceTransaction" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT SUMMARY.accountNo, SUMMARY.transactionAmount, SUMMARY.transactionType, CONVERT(NVARCHAR(20),SUMMARY.transactionDate,103) AS transactionDate 
FROM SUMMARY INNER JOIN INSURANCE ON SUMMARY.accountNo  = INSURANCE.accountNo
WHERE custID =@custID">
        <SelectParameters>
            <asp:SessionParameter Name="custID" SessionField="userId" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />

        
   

</asp:Content>